import {
    _headerPost,
    _headerGet
} from '../../../utils/httpUtils.js'
const app = getApp();
Page({
    data: {
        navbarData: {
            showCapsule: 1, //是否显示左上角图标
            title: '我的钱包' //导航栏 中间的标题
        },
        height: app.globalData.height * 2 + 20
    },

    onLoad(options) {
        // this.data.Ident = options.ident
    },
    onShow() {
        this.getMyWallet()
    },
    //获取钱包余额
    getMyWallet() {
        _headerGet('/api/user/getUserMoney', '', res => {
            if (res.data.code == 1) {
                this.setData({
                    balanceInfo: res.data.data
                })
            }
        })
    },
    //去子界面
    gotoChildren(e) {
        let url = e.currentTarget.id
        wx.navigateTo({
            url: url,
        })
    },
    //余额提现
    putBalance() {
        wx.navigateTo({
            url: './put-forward/index?data=user'
        })
    },
    zhiZHuan() {
        wx.navigateTo({
            url: './stagnant/index',
        })
    }
})